Back to Article
Results (Julia)
Download Notebook

Results (Julia)

In [1]:
Code
using AlgebraOfGraphics
using AlgebraOfGraphics: density
using CairoMakie
using DataFrames
using DataFramesMeta
using Arrow
using PartialFunctions
using LaTeXStrings
using RCall
using Statistics
using beforerr

set_aog_theme!()

include("utils.jl")
:j0_k_norm => (log10 => L"Log Normalized Current Density ($J_A$)")
In [2]:
Code
begin
    j_events_low_fit = load()
    j_events_tau_20_fit = load(tau = 20)
    j_events_high_fit = load(ts = 0.12)

    dir = "../data/05_reporting"
    w_events = load("$dir/events.Wind.fit.ts_0.09s_tau_60s.arrow")

    # add a label column to the dataframes
    j_events_low_fit[!, :label] .= "1 Hz (fit)"
    j_events_high_fit[!, :label] .= "8 Hz (fit)"
    j_events_tau_20_fit[!, :label] .= "1 Hz, 20s (fit)"


    # filter high time resolution events
    j_events_high_fit = @chain j_events_high_fit begin
        filter(:len => >(240), _)
    end

    # combine the dataframes
    j_events = reduce(vcat, [j_events_low_fit, j_events_high_fit, j_events_tau_20_fit])

    println("Number of events: ", size(j_events, 1))
end
┌ Warning: automatically converting Arrow.Timestamp with precision = NANOSECOND to `Dates.DateTime` which only supports millisecond precision; conversion may be lossy; to avoid converting, pass `Arrow.Table(source; convert=false)
└ @ Arrow /Users/zijin/.julia/packages/Arrow/Y6R1E/src/eltypes.jl:273
Number of events: 61879
In [41]:
Code
function load_tau(tau)
    df = load(tau=tau)
    df.label .= "$tau s"
    println("Number of events: ", size(df, 1))
    df
end

j_events_taus = 60:-10:20 .|> load_tau |> x -> reduce(vcat, x)
Number of events: 20875
Number of events: 22721
Number of events: 24788
Number of events: 28132
Number of events: 32944
129460×96 DataFrame
129435 rows omitted
Row time tstart tstop t.d_end t.d_start t.d_time index_diff len std std_prev std_next index_std index_fluctuation B.after B.before b_mag b_n bn_over_b d_star db_mag db_over_b db_over_b_max fit.stat.chisqr fit.stat.rsquared fit.vars.amplitude fit.vars.c fit.vars.sigma rotation_angle dB_x dB_y dB_z dB_lmn_x dB_lmn_y dB_lmn_z k_x k_y k_z Vl_x Vl_y Vl_z Vn_x Vn_y Vn_z duration radial_distance plasma_density plasma_temperature model_b_r model_b_t model_b_n v_x v_y v_z plasma_speed B_background_x B_background_y B_background_z n.before v_x_before v_y_before v_z_before n.after v_x_after v_y_after v_z_after v_l v_n v_k L_k j0_k ion_inertial_length Alfven_speed j_Alfven L_k_norm j0_k_norm v.ion.before.l v.ion.after.l B.vec.before.l B.vec.before.m B.vec.before.n B.vec.after.l B.vec.after.m B.vec.after.n v.Alfven.before v.Alfven.after v.Alfven.before.l v.Alfven.after.l n.change v.ion.change.l B.change v.Alfven.change v.Alfven.change.l r tau ts label
DateTime DateTime DateTime DateTime DateTime DateTime Float64 UInt32 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 String Int64 Float64 String
1 2011-08-25T18:12:30 2011-08-25T18:12:00 2011-08-25T18:13:00 2011-08-25T18:12:57.486 2011-08-25T18:12:30.486 2011-08-25T18:12:36.173 1.14981 60 1.95579 0.628646 0.685787 2.85189 1.05109 3.37203 3.5425 3.37998 -0.144132 -0.0426429 0.509614 -0.170467 0.0504343 0.0998766 1.97526 0.977238 6.01329 -3.83732 2.94992 104.502 2.8 -3.52 3.11 -5.45497 0.15795 0.347617 0.577467 0.748131 0.326853 0.566137 -0.599601 0.565656 0.55045 0.78579 0.282027 5.89985 1.005 2.32783 80537.0 -0.845528 1.85755 0.458 427.406 -9.01539 0.1 427.501 -2.00556 1.79726 1.97153 2.30175 427.554 -9.22503 0.0791532 2.30081 427.559 -9.23257 0.0784032 247.433 228.21 240.101 1416.56 1.68903 149.261 48.3077 18.0168 9.49049 0.0937474 247.63 247.637 -2.89763 -2.03174 0.158264 2.55734 -2.18969 -0.189354 50.9165 48.4763 -41.6478 36.7643 -0.000938325 0.00710056 -0.170467 -2.44025 78.4121 1 60 1.0 60 s
2 2011-08-25T18:36:30 2011-08-25T18:36:00 2011-08-25T18:37:00 2011-08-25T18:36:09.483 2011-08-25T18:36:01.483 2011-08-25T18:36:05.538 1.52996 60 1.5683 0.322511 0.527596 2.97254 2.90678 3.33308 3.50956 3.24918 -0.738451 -0.227273 3.09525 -0.176482 0.0543158 0.275661 0.0725433 0.998858 5.99665 -3.06219 0.484343 128.896 0.77 -6.09 0.66 -6.15597 -0.0421761 0.467823 0.523579 0.156952 0.837395 0.185734 -0.971115 0.149797 0.843537 0.235769 0.482553 0.968685 1.004 2.20272 80800.0 -0.733703 1.68538 0.42 428.113 -10.021 0.0 428.231 -3.04827 -0.0861056 0.617642 2.25271 427.831 -9.61917 0.0399588 2.25243 427.832 -9.62141 0.0397366 89.2467 358.767 222.579 215.609 11.0663 153.441 47.7389 16.8477 1.40516 0.656842 88.81 88.8124 -3.21852 -1.32755 -0.442442 2.93745 -1.28538 -0.910265 50.9891 48.4281 -46.7607 42.6798 -0.000278022 0.00242874 -0.176482 -2.56105 89.4405 1 60 1.0 60 s
3 2011-08-25T19:37:30 2011-08-25T19:37:00 2011-08-25T19:38:00 2011-08-25T19:37:27.493 2011-08-25T19:37:01.493 2011-08-25T19:37:20.348 0.581307 60 0.957243 0.41671 0.272821 2.29714 1.47977 3.78547 3.63997 3.71285 -2.76349 -0.744304 0.155323 0.1455 0.0391881 0.0609006 0.955481 0.959954 4.16602 -1.39409 6.70542 44.2299 -0.51 -2.26 1.57 -2.76648 -0.390797 0.162634 0.428147 0.448436 0.784599 -0.157486 -0.716398 0.679686 0.964654 0.0356548 0.261095 13.4108 1.004 2.11358 82114.0 -0.689713 1.582 0.412 428.838 -13.355 0.1 429.046 -2.07814 2.5292 0.996908 2.14771 428.56 -12.0784 0.0617081 2.14707 428.566 -12.1024 0.0624304 -57.9005 413.23 177.695 2383.04 0.695584 156.643 55.6898 18.8584 15.2132 0.0368846 -58.7975 -58.7806 -1.04011 -2.3491 -2.57862 1.72637 -1.9583 -2.74126 54.1612 56.3346 -15.4764 25.6915 -0.000643789 0.0169169 0.1455 2.17341 41.1679 1 60 1.0 60 s
4 2011-08-25T20:23:30 2011-08-25T20:23:00 2011-08-25T20:24:00 2011-08-25T20:23:33.504 2011-08-25T20:23:11.504 2011-08-25T20:23:13.538 0.341387 60 0.78154 0.2342 0.34695 2.2526 1.24145 3.84393 3.6055 3.785 3.60043 0.951235 -0.934216 0.238434 0.0629945 0.0698958 0.216376 0.972955 -2.14502 0.940009 0.574015 35.9718 -1.68 0.49 -1.51 2.29181 -0.296261 -0.0495461 -0.61159 -0.632595 0.475165 0.796519 -0.120272 0.59253 -0.277136 0.798373 0.534599 1.14803 1.004 2.11358 82114.0 -0.689713 1.582 0.412 428.838 -13.355 0.1 429.046 -2.07814 2.5292 0.996908 2.07431 429.171 -15.6125 0.0613471 2.07369 429.176 -15.6481 0.060736 343.243 129.455 253.777 291.344 2.92944 156.643 56.7721 19.2249 1.85992 0.152378 343.757 343.765 0.802738 -0.393375 3.49292 -1.48907 -0.0971141 3.54246 54.5891 58.2079 12.1539 -22.5487 -0.000620889 0.00812009 0.238434 3.61874 -34.7025 1 60 1.0 60 s
5 2011-08-25T20:59:30 2011-08-25T20:59:00 2011-08-25T21:00:00 2011-08-25T20:59:48.500 2011-08-25T20:59:04.500 2011-08-25T20:59:26.667 0.678205 60 1.18473 0.423919 0.332806 2.79471 1.02598 3.59719 3.56622 3.59315 3.27169 0.910536 -0.121988 0.0309769 0.00862109 0.0452556 1.57173 0.969451 -3.06579 1.57688 6.28296 55.1811 -0.08 0.71 -3.24 3.3149 -0.00580053 -0.139668 -0.986755 -0.161837 -0.0110999 0.0305004 -0.173095 0.984433 0.109853 0.979505 0.168825 12.5659 1.004 2.01198 85998.0 -0.506091 1.59512 0.0243 429.699 -19.1953 -0.0 430.127 -1.64558 2.62274 1.25104 2.01355 429.685 -19.1053 0.00154167 2.0123 429.696 -19.1767 0.000319444 16.4286 28.4017 420.901 5289.01 0.230636 160.55 55.2384 17.8064 32.9431 0.0129525 16.4141 16.4256 1.75124 -0.857029 2.98606 -1.56366 -0.851229 3.12573 54.8031 55.2961 26.9118 -24.0366 -0.00124178 0.0114734 0.0309769 0.493084 -50.9484 1 60 1.0 60 s
6 2011-08-25T22:12:30 2011-08-25T22:12:00 2011-08-25T22:13:00 2011-08-25T22:12:50.493 2011-08-25T22:12:13.493 2011-08-25T22:12:25.324 0.871226 60 1.57288 0.511895 0.752088 2.09136 1.52708 3.90466 3.83343 3.82716 3.13879 0.820135 0.488733 0.071232 0.0186122 0.0594273 2.60068 0.96588 3.33322 -1.79192 1.70503 62.7361 0.1 0.24 4.02 -4.02568 0.148022 -0.00324973 0.543299 0.837135 -0.0634931 0.0318593 0.0955324 0.994916 -0.985057 0.171571 0.0150693 3.41006 1.004 1.9325 81751.0 -0.533438 1.57005 -0.223 429.586 -25.8315 -0.1 430.362 -2.25918 2.58021 0.784467 1.92032 429.16 -25.3247 -0.0796252 1.9197 429.139 -25.2992 -0.0785974 11.1191 427.6 211.776 722.168 1.83648 163.818 60.0336 18.5876 4.40835 0.098801 11.1742 11.177 -1.89928 1.36713 3.03626 2.12639 1.21911 3.03951 60.3225 61.4532 -29.8869 33.4661 -0.000614611 0.00278007 0.071232 1.13073 63.353 1 60 1.0 60 s
7 2011-08-25T22:46:30 2011-08-25T22:46:00 2011-08-25T22:47:00 2011-08-25T22:46:50.505 2011-08-25T22:46:39.505 2011-08-25T22:46:42.388 0.683199 60 1.91696 0.48721 0.335749 3.93458 1.45161 3.77505 3.32503 3.57406 0.699557 0.195732 1.69714 0.450023 0.125914 0.164803 0.229056 0.995538 5.61501 -2.77609 0.82713 100.604 -1.68 3.09 4.19 -5.46959 -0.0968004 -0.0277706 0.624124 0.727109 -0.285976 -0.294482 0.556834 0.77667 -0.827141 -0.555575 0.0847015 1.65426 1.005 1.8727 78310.0 -0.813697 1.54022 -0.135 427.495 -23.3442 -0.0 428.132 -2.36497 2.53234 -0.487414 1.886 427.96 -23.8973 -0.022236 1.88581 427.954 -23.8897 -0.0219304 -138.888 340.63 249.836 413.294 5.40569 166.413 56.9516 17.0877 2.48355 0.31635 -139.351 -139.344 -2.48426 2.08637 0.728896 2.98533 2.18317 0.756667 52.7962 59.9447 -39.4462 47.4047 -0.000182722 0.00635064 0.450023 7.14857 86.8508 1 60 1.0 60 s
8 2011-08-25T22:47:00 2011-08-25T22:46:30 2011-08-25T22:47:30 2011-08-25T22:46:50.505 2011-08-25T22:46:39.505 2011-08-25T22:46:42.388 1.15234 60 1.96769 0.715323 0.228059 2.75077 1.48229 3.77505 3.32503 3.57406 0.699557 0.195732 1.69714 0.450023 0.125914 0.164803 0.229056 0.995538 5.61501 -2.77609 0.82713 100.604 -1.68 3.09 4.19 -5.46959 -0.0968004 -0.0277706 0.624124 0.727109 -0.285976 -0.294482 0.556834 0.77667 -0.827141 -0.555575 0.0847015 1.65426 1.005 1.8727 78310.0 -0.813697 1.54022 -0.135 427.495 -23.3442 -0.0 428.132 -2.36497 2.53234 -0.487414 1.886 427.96 -23.8973 -0.022236 1.88581 427.954 -23.8897 -0.0219304 -138.888 340.63 249.836 413.294 5.40569 166.413 56.9516 17.0877 2.48355 0.31635 -139.351 -139.344 -2.48426 2.08637 0.728896 2.98533 2.18317 0.756667 52.7962 59.9447 -39.4462 47.4047 -0.000182722 0.00635064 0.450023 7.14857 86.8508 1 60 1.0 60 s
9 2011-08-25T23:12:30 2011-08-25T23:12:00 2011-08-25T23:13:00 2011-08-25T23:12:27.455 2011-08-25T23:12:19.455 2011-08-25T23:12:22.095 0.490172 60 0.990987 0.353668 0.333871 2.80203 1.20056 3.48778 3.78313 3.57956 -0.283751 -0.0792698 0.659245 -0.295355 0.0825114 0.107395 0.0795099 0.993202 3.78095 -2.49815 1.43382 50.4408 1.49 0.73 2.63 -3.1094 0.0105564 0.0375582 0.650004 0.552616 -0.521641 0.469672 0.229897 0.852382 -0.608307 -0.615453 0.501179 2.86763 1.005 1.8727 78310.0 -0.813697 1.54022 -0.135 427.495 -23.3442 -0.0 428.132 -2.36497 2.53234 -0.487414 1.88157 426.847 -22.168 0.0 1.88167 426.84 -22.1552 0.0 195.416 245.681 264.973 759.846 1.97986 166.413 57.0393 17.114 4.56603 0.115686 195.382 195.382 -1.89195 3.26803 -0.229401 1.21746 3.25747 -0.266959 60.1408 55.4441 -30.0764 19.3535 9.59778e-5 -0.000366764 -0.295355 -4.6967 49.4299 1 60 1.0 60 s
10 2011-08-26T00:28:30 2011-08-26T00:28:00 2011-08-26T00:29:00 2011-08-26T00:28:44.447 2011-08-26T00:28:08.447 2011-08-26T00:28:30.217 1.39288 60 1.95695 0.380081 0.820966 2.38371 1.70701 2.40711 3.26038 2.91651 0.848892 0.291064 0.487105 -0.853269 0.292565 0.292565 3.07076 0.972807 4.01759 -2.23615 2.06197 107.317 3.46 2.2 2.07 -4.45609 1.10452 0.140838 0.17654 0.512842 -0.840135 0.603985 0.671145 0.429844 -0.48252 -0.121329 0.867441 4.12394 1.005 1.91589 76599.0 -0.971551 1.42106 -0.0674 424.341 -17.6176 0.0 424.706 -2.71071 1.58004 -0.429717 2.00035 424.041 -15.1011 0.0 2.00215 424.034 -15.0474 0.0 244.472 202.615 65.8779 271.677 5.884 164.527 45.9469 14.1038 1.65126 0.417192 245.979 246.012 -2.37139 2.06097 0.871211 2.0847 0.956451 0.730373 50.2682 37.0959 -36.5618 32.1272 0.0018008 0.0321466 -0.853269 -13.1723 68.689 1 60 1.0 60 s
11 2011-08-26T01:32:30 2011-08-26T01:32:00 2011-08-26T01:33:00 2011-08-26T01:32:59.441 2011-08-26T01:32:16.441 2011-08-26T01:32:33.159 1.49745 60 1.54993 0.38221 0.240075 4.05517 3.45514 3.20695 2.45477 2.70916 -0.11425 -0.0421716 -0.182881 0.752175 0.277641 0.386893 1.0319 0.988622 -4.17937 1.73523 5.71324 94.6347 -4.12 -0.59 0.51 4.19173 0.0789742 -0.0756951 0.155456 -0.262318 0.952377 0.986775 0.116589 -0.112612 0.149174 -0.381394 0.912297 11.4265 1.004 2.26318 83624.0 -0.593271 1.45895 -0.241 425.406 -6.88566 0.1 425.462 -2.81666 1.41781 0.725828 2.18591 424.618 -9.36544 0.05379 2.18791 424.639 -9.30134 0.0549845 418.967 66.1772 68.0336 777.385 2.13912 151.378 39.2694 14.2391 5.1354 0.150228 417.905 417.932 1.54906 1.88629 -0.261176 -2.64267 1.80732 -0.185481 36.2053 47.2775 22.8471 -38.9589 0.00199723 0.0274398 0.752175 11.0722 -61.8059 1 60 1.0 60 s
12 2011-08-26T01:33:00 2011-08-26T01:32:30 2011-08-26T01:33:30 2011-08-26T01:33:11.441 2011-08-26T01:32:30.441 2011-08-26T01:32:39.655 1.05955 60 0.992642 0.368058 0.212396 2.69697 3.63979 3.32959 2.4368 2.9797 0.0846225 0.0283997 0.0984773 0.892793 0.299625 0.299625 1.41476 0.964367 5.26661 -2.54511 13.3701 71.6925 -3.14 -1.43 -0.15 -3.43554 0.351772 -0.0169723 0.115255 -0.35057 0.929418 -0.863977 -0.496655 -0.0829259 0.101529 -0.333136 0.937397 26.7402 1.004 2.26318 83624.0 -0.593271 1.45895 -0.241 425.406 -6.88566 0.1 425.462 -2.81666 1.41781 0.725828 2.18656 424.625 -9.34457 0.0541789 2.18847 424.644 -9.28345 0.0553178 -364.13 45.5789 51.5373 1378.12 1.52056 151.378 43.1908 15.661 9.10385 0.0970922 -362.23 -362.277 -1.20369 -2.11824 0.0466111 2.23185 -2.47002 0.0635834 35.935 49.0794 -17.7505 32.8983 0.00190434 -0.0472294 0.892793 13.1445 50.6489 1 60 1.0 60 s
13 2011-08-26T02:00:00 2011-08-26T01:59:30 2011-08-26T02:00:30 2011-08-26T02:00:25.438 2011-08-26T02:00:10.438 2011-08-26T02:00:20.333 0.323677 60 0.474221 0.19861 0.224274 2.11448 1.19317 3.82425 3.80869 3.80927 3.62613 0.951922 -0.389103 0.0155641 0.00408585 0.0245378 0.0277214 0.995523 -1.51974 0.686448 0.976442 24.8302 -0.7 -1.44 -0.36 1.63952 0.0714469 0.00879937 0.164802 -0.313875 0.935052 0.447135 0.857982 0.252856 -0.817776 0.277599 0.504164 1.95288 1.004 2.26318 83624.0 -0.593271 1.45895 -0.241 425.406 -6.88566 0.1 425.462 -2.81666 1.41781 0.725828 2.26294 425.41 -6.88496 0.10029 2.2626 425.416 -6.88394 0.100707 184.332 349.748 72.3624 141.315 4.27899 151.378 55.2154 20.0212 0.933528 0.213723 184.334 184.338 0.723777 0.962402 3.61331 -0.915741 0.890955 3.60451 55.2099 55.4397 10.4917 -13.2754 -0.000343167 0.00354577 0.0155641 0.229818 -23.7671 1 60 1.0 60 s
129449 2016-06-29T17:52:00 2016-06-29T17:51:50 2016-06-29T17:52:10 2016-06-29T17:52:09.508 2016-06-29T17:51:55.508 2016-06-29T17:52:01.732 0.189191 20 0.774132 0.33061 0.281566 2.34153 1.18623 8.99063 10.3053 9.75048 -0.115075 -0.011802 -0.507264 -1.31466 0.13483 0.13483 0.343722 0.956933 -1.61951 5.78076 0.798161 9.155 -0.36 1.26 -1.54 1.99378 0.337094 0.00523912 -0.854835 0.285415 0.433353 0.0996984 -0.737512 0.667934 -0.865027 0.267491 0.424473 1.59632 5.41 0.02876 24531.0 0.00738661 -0.0877102 0.061 472.69 5.49513 -0.0 472.722 0.463417 -1.95633 4.53201 0.0287021 472.798 5.48739 0.0 0.0287038 472.795 5.48762 0.0 43.0737 407.42 402.504 642.526 1.00289 1342.85 1253.75 5.77709 0.47848 0.173598 43.0902 43.0897 5.96714 8.40069 -0.14369 3.97336 8.0636 -0.148929 1326.42 1157.17 768.045 511.407 1.67222e-6 -0.000476594 -1.31466 -169.247 -256.639 5 20 1.0 20 s
129450 2016-06-29T18:18:40 2016-06-29T18:18:30 2016-06-29T18:18:50 2016-06-29T18:18:43.506 2016-06-29T18:18:30.506 2016-06-29T18:18:38.475 0.525184 20 0.964353 0.124704 0.449509 2.14535 2.61255 5.15581 2.87811 3.82934 0.596585 0.155793 0.527614 2.27771 0.594803 0.594846 0.0201056 0.998277 2.2586 2.87899 1.0702 5.76222 0.43 0.01 2.27 -2.30342 0.178363 0.01846 -0.887345 0.430114 0.166193 0.114098 0.0314769 0.992971 -0.437258 -0.895891 0.0786432 2.14039 5.41 0.02876 24531.0 0.00738661 -0.0877102 0.061 472.69 5.49513 -0.0 472.722 0.463417 -1.95633 4.53201 0.0288865 472.406 5.48859 0.0 0.028888 472.402 5.48851 0.0 54.1061 211.611 417.076 892.705 1.00668 1342.85 492.388 2.26886 0.664785 0.443695 54.0735 54.0731 2.80083 -0.227055 0.62233 5.10425 -0.405418 0.60387 369.265 661.48 359.35 654.865 1.48056e-6 -0.000382173 2.27771 292.215 295.515 5 20 1.0 20 s
129451 2016-06-29T18:53:10 2016-06-29T18:53:00 2016-06-29T18:53:20 2016-06-29T18:53:19.504 2016-06-29T18:53:04.504 2016-06-29T18:53:11.565 0.556865 20 1.18115 0.380846 0.49968 2.36381 1.5356 7.3574 4.255 5.87958 0.732673 0.124613 0.307259 3.1024 0.527657 0.527657 0.0349056 0.998198 3.81845 3.83212 3.10686 3.79389 -0.09 -1.76 2.58 -3.11857 0.175387 -0.0763698 0.899577 0.34556 0.267112 0.0225044 -0.535441 0.844273 -0.83507 0.45425 0.310346 6.21372 5.41 0.02917 24295.0 0.00711353 -0.0885736 0.0616 471.768 5.47394 -0.0 471.8 -0.164622 -1.31975 4.1537 0.0291227 471.875 5.47638 0.0 0.0291244 471.871 5.4763 0.0 7.68588 391.473 426.284 2648.81 0.573584 1333.38 750.683 3.50835 1.98654 0.163491 7.68697 7.68693 4.20028 0.103421 0.672247 7.31886 -0.0719663 0.748617 543.703 940.099 536.712 935.175 1.70833e-6 -3.91588e-5 3.1024 396.397 398.463 5 20 1.0 20 s
129452 2016-06-29T19:59:50 2016-06-29T19:59:40 2016-06-29T20:00:00 2016-06-29T19:59:54.499 2016-06-29T19:59:45.499 2016-06-29T19:59:50.048 0.204328 20 0.614799 0.264818 0.156012 2.32159 1.54667 6.53553 5.11511 5.84435 -1.3161 -0.225192 0.312729 1.42042 0.243042 0.243042 0.00135033 0.99958 1.58536 4.75163 1.26736 4.84807 0.48 -0.1 1.42 -1.5012 0.0247184 -0.0508867 0.675328 -0.683752 -0.276432 0.30795 -0.03117 0.950892 -0.11105 -0.993809 0.00338703 2.53472 5.41 0.02956 24063.0 0.0067229 -0.0895157 0.0622 470.945 5.43331 -0.0 470.976 2.37214 0.3364 4.39767 0.0295584 470.948 5.43347 0.0 0.0295594 470.946 5.43337 0.0 144.858 57.6979 314.327 796.73 0.791728 1324.55 741.245 3.51056 0.601509 0.225527 144.859 144.859 4.78551 -1.21476 -1.33698 6.28671 -1.23948 -1.2861 648.772 828.916 606.968 797.359 9.75e-7 -0.000630918 1.42042 180.145 190.391 5 20 1.0 20 s
129453 2016-06-29T20:10:30 2016-06-29T20:10:20 2016-06-29T20:10:40 2016-06-29T20:10:39.498 2016-06-29T20:10:29.498 2016-06-29T20:10:34.841 0.220783 20 0.551208 0.201918 0.192308 2.72987 1.40508 6.1445 4.36424 5.22413 -0.180801 -0.0346089 0.294014 1.78026 0.340776 0.340776 0.00493797 0.998887 1.8973 4.32684 1.61327 0.748167 0.91 0.07 1.53 -1.77674 0.12324 0.0437626 0.831348 -0.277021 -0.481788 0.493318 0.110528 0.862799 -0.869073 0.104531 0.483514 3.22654 5.41 0.02956 24063.0 0.0067229 -0.0895157 0.0622 470.945 5.43331 -0.0 470.976 2.37214 0.3364 4.39767 0.0296229 470.784 5.4296 0.0 0.0296239 470.781 5.42954 0.0 232.926 408.717 390.014 1258.4 0.599899 1324.55 662.582 3.13801 0.950054 0.191171 232.846 232.845 4.3606 -0.10846 -0.141327 6.13734 -0.231699 -0.18509 552.933 778.472 552.472 777.565 1.0e-6 -0.00126955 1.78026 225.539 225.093 5 20 1.0 20 s
129454 2016-06-29T20:54:30 2016-06-29T20:54:20 2016-06-29T20:54:40 2016-06-29T20:54:38.495 2016-06-29T20:54:20.495 2016-06-29T20:54:29.328 0.75122 20 1.44281 0.334532 0.39231 3.67774 2.66115 6.10451 2.95059 4.60474 -0.708676 -0.153901 1.1292 3.15391 0.684927 0.684927 1.59572 0.953341 2.81101 2.1619 0.622345 22.1891 1.21 -1.85 2.78 -3.46521 -0.761839 -0.16415 0.821615 -0.239766 -0.517166 0.345287 -0.687893 0.63842 -0.913635 -0.0908405 0.396256 1.24469 5.41 0.02992 23837.0 0.00641093 -0.0905752 0.0628 470.023 5.41212 -0.0 470.054 1.54768 0.235514 2.1228 0.029886 470.11 5.41412 0.0 0.0298878 470.105 5.41401 0.0 158.57 429.921 384.88 479.057 2.33472 1316.56 580.501 2.78275 0.36387 0.838998 158.599 158.597 1.83609 2.2368 -0.575757 5.3013 2.99864 -0.411607 372.18 769.983 231.599 668.671 1.8e-6 -0.0015184 3.15391 397.803 437.072 5 20 1.0 20 s
129455 2016-06-29T21:01:20 2016-06-29T21:01:10 2016-06-29T21:01:30 2016-06-29T21:01:29.494 2016-06-29T21:01:12.494 2016-06-29T21:01:24.595 0.375741 20 0.691428 0.277938 0.182235 2.48771 2.44022 4.17833 6.11428 5.29864 0.554297 0.104611 -0.174799 -1.93595 0.365368 0.365368 0.0970441 0.987013 -2.51135 5.84747 3.59176 8.64483 -1.78 -0.56 -0.92 2.07819 0.0846216 0.048562 0.490207 -0.695832 -0.524895 0.86412 0.223847 0.450766 -0.493918 0.549186 0.674122 7.18353 5.41 0.02992 23837.0 0.00641093 -0.0905752 0.0628 470.023 5.41212 -0.0 470.054 1.54768 0.235514 2.1228 0.0299268 470.004 5.41169 0.0 0.0299285 470.0 5.41159 0.0 407.368 229.181 226.643 1628.1 0.613743 1316.56 667.977 3.20209 1.23663 0.19167 407.352 407.348 5.88719 -1.56759 0.517744 3.809 -1.65221 0.469182 770.713 526.669 742.088 480.116 1.60556e-6 -0.0037835 -1.93595 -244.044 -261.972 5 20 1.0 20 s
129456 2016-06-29T21:51:00 2016-06-29T21:50:50 2016-06-29T21:51:10 2016-06-29T21:51:08.490 2016-06-29T21:50:53.490 2016-06-29T21:50:58.241 0.153165 20 0.377087 0.158939 0.136294 2.37252 1.76498 5.95951 5.00645 5.61638 -0.852551 -0.151797 -0.165855 0.953059 0.169693 0.169693 0.025496 0.98627 -0.914633 -4.90048 1.37866 2.20737 0.54 0.81 -0.07 0.975617 0.0268079 -0.00732001 0.68841 -0.504016 -0.521594 -0.552333 -0.827594 0.100086 0.813975 -0.5095 0.279025 2.75733 5.41 0.03026 23619.0 0.00600086 -0.0916153 0.0634 469.101 5.39093 -0.0 469.132 2.83202 3.72696 -0.33005 0.0302084 469.241 5.39415 0.0 0.0302098 469.237 5.39406 0.0 -263.562 379.09 320.217 882.943 0.412168 1309.14 704.045 3.41334 0.674444 0.120752 -263.642 -263.639 -4.89231 0.656648 -0.835816 -5.86793 0.62984 -0.828496 628.122 747.677 -613.802 -736.188 1.41667e-6 0.00219427 0.953059 119.556 -122.386 5 20 1.0 20 s
129457 2016-06-29T22:08:10 2016-06-29T22:08:00 2016-06-29T22:08:20 2016-06-29T22:08:19.489 2016-06-29T22:08:00.489 2016-06-29T22:08:13.024 0.142639 20 0.27444 0.100087 0.107956 2.54215 1.42451 6.02031 5.30301 5.60419 -1.18967 -0.212282 0.0749674 0.717299 0.127993 0.127993 0.0241145 0.982935 0.815379 4.8614 2.71911 3.5783 0.51 0.45 0.42 -0.798046 0.0458862 -0.00412336 0.719524 -0.678873 -0.146344 0.634627 0.602675 0.483767 -0.759032 0.36837 0.536818 5.43822 5.41 0.03026 23619.0 0.00600086 -0.0916153 0.0634 469.101 5.39093 -0.0 469.132 2.83202 3.72696 -0.33005 0.0303014 468.994 5.3986 0.0 0.030303 468.99 5.39891 0.0 300.953 354.077 333.87 1815.66 0.178684 1309.14 702.516 3.40593 1.38691 0.0524626 300.89 300.887 4.80427 1.90792 -1.18354 5.60231 1.86203 -1.17941 664.307 754.143 601.83 701.782 1.63611e-6 -0.00251075 0.717299 89.8356 99.9522 5 20 1.0 20 s
129458 2016-06-29T22:57:30 2016-06-29T22:57:20 2016-06-29T22:57:40 2016-06-29T22:57:37.486 2016-06-29T22:57:20.486 2016-06-29T22:57:25.036 0.40094 20 0.770162 0.260231 0.286404 2.68907 2.01895 6.35638 4.07844 5.46547 -0.958553 -0.175383 -0.209053 2.27794 0.416787 0.416787 0.115935 0.988598 -2.96217 -3.35518 3.54237 6.41159 0.96 2.06 -0.59 2.33533 -0.242101 -0.0307072 0.908272 -0.41797 0.018515 -0.335604 -0.884205 0.324887 -0.50908 0.460428 0.727217 7.08474 5.41 0.03057 23409.0 0.00555191 -0.0928516 0.064 468.297 5.44839 -0.0 468.329 1.60957 4.19324 -2.68982 0.0305563 468.333 5.44585 0.0 0.0305577 468.329 5.44612 0.0 -161.98 235.892 423.064 2997.3 0.393224 1302.49 681.645 3.3386 2.30121 0.117781 -161.99 -161.989 -3.96042 -0.384483 -0.894963 -6.29574 -0.142382 -0.864256 508.771 792.916 -494.048 -785.352 1.46389e-6 0.00103453 2.27794 284.146 -291.304 5 20 1.0 20 s
129459 2016-06-29T23:00:40 2016-06-29T23:00:30 2016-06-29T23:00:50 2016-06-29T23:00:49.486 2016-06-29T23:00:30.486 2016-06-29T23:00:45.272 0.513532 20 0.876452 0.269196 0.358307 2.44609 2.0503 3.49243 5.95306 5.13386 1.65798 0.32295 0.273402 -2.46062 0.479293 0.479293 0.0701017 0.995331 3.23754 -5.69729 2.96043 11.9154 -0.51 -2.27 1.24 -2.63509 0.0738617 0.0377403 0.316009 -0.508527 -0.800961 -0.171952 -0.875169 0.452229 0.941744 -0.0113381 0.336139 5.92086 5.41 0.03057 23409.0 0.00555191 -0.0928516 0.064 468.297 5.44839 -0.0 468.329 1.60957 4.19324 -2.68982 0.0305724 468.289 5.44829 -0.000846833 0.0305738 468.285 5.44822 -0.00137461 -85.2927 440.954 145.216 859.801 1.49823 1302.49 640.286 3.13603 0.660122 0.477747 -85.2917 -85.291 -5.70151 0.104212 1.70906 -3.06641 0.0303504 1.67132 742.427 435.543 -711.055 -382.414 1.47778e-6 0.000638453 -2.46062 -306.883 328.641 5 20 1.0 20 s
129460 2016-06-29T23:52:40 2016-06-29T23:52:30 2016-06-29T23:52:50 2016-06-29T23:52:46.513 2016-06-29T23:52:30.513 2016-06-29T23:52:42.222 0.236361 20 0.71978 0.305422 0.349256 2.06089 2.10608 8.21224 8.23578 7.9465 -4.20376 -0.529007 0.175414 -0.0235408 0.00296241 0.0614758 0.0523528 0.992376 2.71179 -1.19581 3.86485 13.9065 -1.97 0.29 0.02 -1.98693 -0.0700221 0.112245 0.0736506 0.438545 0.895686 -0.982073 0.175406 0.0690344 0.0537928 -0.0902143 0.994469 7.72971 5.41 0.03085 23217.0 0.00508489 -0.0940889 0.0645 467.396 5.43556 -0.1 467.427 1.05905 6.63447 -4.30957 0.030815 467.508 5.43717 -0.0875142 0.0308163 467.504 5.43711 -0.0879587 -458.07 24.5527 36.7182 283.821 3.80165 1296.56 986.567 4.87632 0.218902 0.779616 -458.18 -458.176 -1.08158 -7.03396 -4.14508 0.90535 -6.96394 -4.25732 1023.06 1020.12 -134.356 112.462 1.24444e-6 0.00389291 -0.0235408 -2.94487 246.817 5 20 1.0 20 s
In [4]:
Code
j_events_low_der = load(method="derivative")
j_events_high_der = load(ts = 0.12, method="derivative")

j_events_low_der[!, :label] .= "1 Hz (derivative)"
j_events_high_der[!, :label] .= "8 Hz (derivative)"
j_events_der = vcat(j_events_low_der, j_events_high_der, cols=:intersect)
87515×91 DataFrame
87490 rows omitted
Row time tstart tstop t.d_end t.d_start t.d_time index_diff len std std_prev std_next index_std index_fluctuation d_star B.after B.before b_mag b_n bn_over_b db_mag db_over_b db_over_b_max rotation_angle dB_x dB_y dB_z dB_lmn_x dB_lmn_y dB_lmn_z k_x k_y k_z Vl_x Vl_y Vl_z Vn_x Vn_y Vn_z duration radial_distance plasma_density plasma_temperature model_b_r model_b_t model_b_n v_x v_y v_z plasma_speed B_background_x B_background_y B_background_z n.before v_x_before v_y_before v_z_before n.after v_x_after v_y_after v_z_after v_l v_n v_k L_k j0_k ion_inertial_length Alfven_speed j_Alfven L_k_norm j0_k_norm v.ion.before.l v.ion.after.l B.vec.before.l B.vec.before.m B.vec.before.n B.vec.after.l B.vec.after.m B.vec.after.n v.Alfven.before v.Alfven.after v.Alfven.before.l v.Alfven.after.l n.change v.ion.change.l B.change v.Alfven.change v.Alfven.change.l r tau ts label
DateTime DateTime DateTime DateTime DateTime DateTime Float64 UInt32 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 String Int64 Float64 String
1 2011-08-25T15:54:30 2011-08-25T15:54:00 2011-08-25T15:55:00 2011-08-25T15:54:19.500 2011-08-25T15:54:13.500 2011-08-25T15:54:15.500 0.454745 60 0.810663 0.238493 0.313628 2.58479 1.74924 0.494419 3.54272 3.58163 3.54382 3.47558 0.980743 -0.0389088 0.0109793 0.0248571 23.3528 0.26 -0.52 1.32 -1.42862 -0.195891 0.032567 0.741752 0.660873 0.114241 0.0723711 -0.443734 0.893232 -0.731645 0.58503 0.349907 6.0 1.004 2.85307 80800.0 -0.725192 2.28581 0.281 431.292 -16.8446 -0.0 431.62 -1.94684 2.05757 1.45917 2.85307 431.292 -16.8446 -0.0 2.85307 431.292 -16.8446 -0.0 38.6876 325.407 308.779 1852.68 1.2742 134.823 45.7503 20.913 13.7415 0.0609285 38.6876 38.6876 -0.787022 0.300817 3.48112 0.641602 0.496708 3.44855 46.2384 45.7361 -10.1603 8.283 0.0 0.0 -0.0389088 -0.502307 18.4433 1 60 1.0 1 Hz (derivative)
2 2011-08-25T16:12:00 2011-08-25T16:11:30 2011-08-25T16:12:30 2011-08-25T16:12:12.498 2011-08-25T16:12:07.498 2011-08-25T16:12:09.498 0.495007 60 1.11719 0.316177 0.557412 2.00425 1.12462 0.942603 3.57505 3.50203 3.51381 -0.204569 -0.0582186 0.0730245 0.0207821 0.0359684 46.4435 -0.79 -0.55 2.62 -2.79044 -0.044947 0.0490867 0.700717 0.62577 0.342649 -0.279839 -0.174058 0.944136 0.742809 0.583772 0.327789 5.0 1.004 2.85307 80800.0 -0.725192 2.28581 0.281 431.292 -16.8446 -0.0 431.62 -1.94684 2.05757 1.45917 2.81552 430.737 -15.511 0.0202083 2.81526 430.734 -15.5018 0.0203472 -117.76 310.534 291.672 1458.36 2.57172 134.823 45.3628 20.7359 10.8168 0.124023 -117.818 -117.819 -1.25377 -3.26559 -0.167837 1.53668 -3.22065 -0.216924 45.5112 46.4623 -16.2935 19.9711 -0.000258056 -0.000398398 0.0730245 0.951131 36.2646 1 60 1.0 1 Hz (derivative)
3 2011-08-25T16:14:00 2011-08-25T16:13:30 2011-08-25T16:14:30 2011-08-25T16:13:58.498 2011-08-25T16:13:47.498 2011-08-25T16:13:50.498 0.709049 60 1.69707 0.557412 0.421622 3.04456 1.14809 0.8757 3.50344 3.54924 3.51288 0.561596 0.159868 -0.0457982 0.0130372 0.0372845 81.0004 1.43 0.6 4.31 -4.57912 0.112352 0.00701283 0.692433 0.646746 -0.319774 0.298756 0.15153 0.942223 -0.81238 -0.47771 0.334412 11.0 1.004 2.85307 80800.0 -0.725192 2.28581 0.281 431.292 -16.8446 -0.0 431.62 -1.94684 2.05757 1.45917 2.81036 430.661 -15.3277 0.0229861 2.80979 430.653 -15.3075 0.0232916 126.298 342.326 287.746 3165.21 2.42178 134.823 45.3508 20.7304 23.4767 0.116823 126.362 126.363 -2.25961 2.6796 0.557655 2.31951 2.56725 0.550642 46.167 45.5759 -29.3921 30.1742 -0.000567722 0.000840087 -0.0457982 -0.59112 59.5663 1 60 1.0 1 Hz (derivative)
4 2011-08-25T17:10:30 2011-08-25T17:10:00 2011-08-25T17:11:00 2011-08-25T17:10:57.492 2011-08-25T17:10:46.492 2011-08-25T17:10:51.492 0.445944 60 0.741714 0.259332 0.202326 2.86009 1.78203 0.574152 3.57263 3.6649 3.62105 0.76745 0.211942 -0.092269 0.0254813 0.0497287 26.214 1.43 0.8 0.13 1.63392 0.179134 -0.00117569 -0.320576 0.680158 -0.659254 -0.912125 -0.409664 -0.0142668 0.231363 -0.543241 0.807069 11.0 1.004 2.66727 81441.0 -1.03776 2.14679 0.157 428.549 -10.2454 0.1 428.672 -1.62058 2.17097 2.18332 2.60631 428.344 -10.0245 0.1 2.60528 428.341 -10.0207 0.1 -386.695 104.797 144.417 1588.59 3.16372 139.44 48.348 20.6612 11.3926 0.153124 -386.598 -386.596 1.3936 -3.30101 0.769878 -0.240329 -3.48015 0.771054 49.5025 48.2658 18.8235 -3.24681 -0.00103718 0.00164618 -0.092269 -1.23669 -22.0704 1 60 1.0 1 Hz (derivative)
5 2011-08-25T17:11:00 2011-08-25T17:10:30 2011-08-25T17:11:30 2011-08-25T17:10:57.492 2011-08-25T17:10:46.492 2011-08-25T17:10:51.492 0.375544 60 0.754927 0.142901 0.112281 5.28286 2.81814 0.574152 3.57263 3.6649 3.62105 0.76745 0.211942 -0.092269 0.0254813 0.0497287 26.214 1.43 0.8 0.13 1.63392 0.179134 -0.00117569 -0.320576 0.680158 -0.659254 -0.912125 -0.409664 -0.0142668 0.231363 -0.543241 0.807069 11.0 1.004 2.66727 81441.0 -1.03776 2.14679 0.157 428.549 -10.2454 0.1 428.672 -1.62058 2.17097 2.18332 2.60631 428.344 -10.0245 0.1 2.60528 428.341 -10.0207 0.1 -386.695 104.797 144.417 1588.59 3.16372 139.44 48.348 20.6612 11.3926 0.153124 -386.598 -386.596 1.3936 -3.30101 0.769878 -0.240329 -3.48015 0.771054 49.5025 48.2658 18.8235 -3.24681 -0.00103718 0.00164618 -0.092269 -1.23669 -22.0704 1 60 1.0 1 Hz (derivative)
6 2011-08-25T17:51:00 2011-08-25T17:50:30 2011-08-25T17:51:30 2011-08-25T17:51:26.488 2011-08-25T17:51:21.488 2011-08-25T17:51:23.488 1.07433 60 1.05528 0.359151 0.411645 2.56357 2.18751 0.424323 3.62119 3.60615 3.63155 2.56922 0.707472 0.0150401 0.00414152 0.0128974 22.0733 -0.17 -0.3 -1.34 1.38358 0.0138151 0.00408719 -0.419294 -0.873129 0.248671 0.128792 0.208328 0.969542 -0.940333 -0.28484 0.186116 5.0 1.005 2.32783 80537.0 -0.845528 1.85755 0.458 427.406 -9.01539 0.1 427.501 -2.00556 1.79726 1.97153 2.37672 427.571 -9.19254 0.1 2.37625 427.569 -9.19083 0.1 53.2654 399.318 171.313 856.563 1.97105 149.261 51.9032 19.3578 5.7387 0.101822 53.2497 53.2498 0.620514 2.45087 2.57148 -0.763065 2.43706 2.56739 51.0073 51.2251 8.77689 -10.7943 -0.000471444 0.000151415 0.0150401 0.217816 -19.5712 1 60 1.0 1 Hz (derivative)
7 2011-08-25T18:12:30 2011-08-25T18:12:00 2011-08-25T18:13:00 2011-08-25T18:12:57.486 2011-08-25T18:12:50.486 2011-08-25T18:12:51.486 1.14981 60 1.95579 0.628646 0.685787 2.85189 1.05109 0.992635 3.37203 3.38328 3.38483 3.27524 0.967625 -0.0112504 0.00332377 0.084744 32.8901 0.51 -1.83 -0.22 1.87976 0.351161 -0.0243392 0.960699 0.254375 0.111135 -0.0856697 0.986757 0.137736 -0.0305596 -0.140781 0.989569 7.0 1.005 2.32783 80537.0 -0.845528 1.85755 0.458 427.406 -9.01539 0.1 427.501 -2.00556 1.79726 1.97153 2.30105 427.558 -9.23061 0.0785976 2.30081 427.559 -9.23257 0.0784032 -45.498 11.6932 408.327 2858.29 1.93452 149.261 48.377 18.0427 19.1496 0.107219 -45.7263 -45.7283 0.97324 0.32948 3.22348 -0.906519 -0.0216808 3.24782 48.6354 48.4763 13.9905 -13.0321 -0.000243269 -0.00207406 -0.0112504 -0.159164 -27.0226 1 60 1.0 1 Hz (derivative)
8 2011-08-25T18:36:00 2011-08-25T18:35:30 2011-08-25T18:36:30 2011-08-25T18:36:07.483 2011-08-25T18:36:03.483 2011-08-25T18:36:05.483 1.52686 60 2.78586 0.275463 0.515903 5.39996 3.24459 2.34421 3.28568 3.3506 3.13738 -0.899482 -0.286699 -0.0649159 0.0206911 0.234818 115.745 1.3 -5.36 1.08 -5.61749 0.160307 -0.0643851 0.528548 0.289022 0.798187 0.233802 -0.958704 0.161935 0.870498 0.28059 0.404354 4.0 1.004 2.20272 80800.0 -0.733703 1.68538 0.42 428.113 -10.021 0.0 428.231 -3.04827 -0.0861056 0.617642 2.25264 427.831 -9.61973 0.0399032 2.2525 427.832 -9.62085 0.0397921 109.701 369.86 223.382 893.529 8.35097 153.441 46.0962 16.268 5.82327 0.513337 109.257 109.258 -2.88036 -1.44288 -0.920926 2.73712 -1.60318 -0.856541 48.6804 47.7387 -41.8484 39.7685 -0.000139011 0.00123692 -0.0649159 -0.941682 81.6169 1 60 1.0 1 Hz (derivative)
9 2011-08-25T18:36:30 2011-08-25T18:36:00 2011-08-25T18:37:00 2011-08-25T18:36:07.483 2011-08-25T18:36:03.483 2011-08-25T18:36:05.483 1.52996 60 1.5683 0.322511 0.527596 2.97254 2.90678 2.34421 3.28568 3.3506 3.13738 -0.899482 -0.286699 -0.0649159 0.0206911 0.234818 115.745 1.3 -5.36 1.08 -5.61749 0.160307 -0.0643851 0.528548 0.289022 0.798187 0.233802 -0.958704 0.161935 0.870498 0.28059 0.404354 4.0 1.004 2.20272 80800.0 -0.733703 1.68538 0.42 428.113 -10.021 0.0 428.231 -3.04827 -0.0861056 0.617642 2.25264 427.831 -9.61973 0.0399032 2.2525 427.832 -9.62085 0.0397921 109.701 369.86 223.382 893.529 8.35097 153.441 46.0962 16.268 5.82327 0.513337 109.257 109.258 -2.88036 -1.44288 -0.920926 2.73712 -1.60318 -0.856541 48.6804 47.7387 -41.8484 39.7685 -0.000139011 0.00123692 -0.0649159 -0.941682 81.6169 1 60 1.0 1 Hz (derivative)
10 2011-08-25T19:10:30 2011-08-25T19:10:00 2011-08-25T19:11:00 2011-08-25T19:10:42.495 2011-08-25T19:10:37.495 2011-08-25T19:10:40.495 0.5833 60 0.818396 0.26124 0.353684 2.31392 1.6763 0.561983 3.50297 3.42983 3.42623 3.3348 0.973316 0.0731451 0.0213486 0.0340877 29.5653 0.28 -1.06 -1.39 1.77029 0.00930251 -0.00926916 0.483656 -0.646269 0.590265 -0.159478 0.592809 0.789395 -0.812782 -0.532697 0.235835 5.0 1.004 2.20272 80800.0 -0.733703 1.68538 0.42 428.113 -10.021 0.0 428.231 -3.04827 -0.0861056 0.617642 2.18693 428.242 -10.6114 0.0177082 2.18681 428.243 -10.616 0.0178471 -74.215 342.625 213.536 1067.68 2.09432 153.441 50.3402 17.7658 6.95824 0.117885 -74.5715 -74.5743 0.757799 0.306586 3.33098 -1.01249 0.297283 3.34025 50.5745 51.6546 11.1741 -14.9301 -0.000123806 -0.00279586 0.0731451 1.08002 -26.1043 1 60 1.0 1 Hz (derivative)
11 2011-08-25T19:37:00 2011-08-25T19:36:30 2011-08-25T19:37:30 2011-08-25T19:37:17.493 2011-08-25T19:37:10.493 2011-08-25T19:37:14.493 0.536843 60 0.888836 0.375376 0.278124 2.36786 1.67687 0.354013 3.84081 3.6459 3.68318 1.01859 0.276551 0.194905 0.0529177 0.0613912 17.6017 -0.36 -0.64 0.9 -1.15133 0.153586 -0.00688584 0.487703 0.607433 0.627033 -0.186695 -0.599972 0.777932 0.231292 0.742754 0.628348 7.0 1.004 2.11358 82114.0 -0.689713 1.582 0.412 428.838 -13.355 0.1 429.046 -2.07814 2.5292 0.996908 2.14749 428.562 -12.0867 0.0619581 2.14732 428.564 -12.0932 0.0621526 -71.9715 89.3301 201.096 1407.67 1.40089 156.643 55.2448 18.7077 8.98648 0.0748833 -72.7105 -72.7068 -0.421006 -3.46721 1.04586 0.730325 -3.62079 1.05275 54.2522 57.1548 -6.26471 10.8679 -0.000173328 0.00377776 0.194905 2.90256 17.1326 1 60 1.0 1 Hz (derivative)
12 2011-08-25T19:37:30 2011-08-25T19:37:00 2011-08-25T19:38:00 2011-08-25T19:37:17.493 2011-08-25T19:37:10.493 2011-08-25T19:37:14.493 0.581307 60 0.957243 0.41671 0.272821 2.29714 1.47977 0.354013 3.84081 3.6459 3.68318 1.01859 0.276551 0.194905 0.0529177 0.0613912 17.6017 -0.36 -0.64 0.9 -1.15133 0.153586 -0.00688584 0.487703 0.607433 0.627033 -0.186695 -0.599972 0.777932 0.231292 0.742754 0.628348 7.0 1.004 2.11358 82114.0 -0.689713 1.582 0.412 428.838 -13.355 0.1 429.046 -2.07814 2.5292 0.996908 2.14749 428.562 -12.0867 0.0619581 2.14732 428.564 -12.0932 0.0621526 -71.9715 89.3301 201.096 1407.67 1.40089 156.643 55.2448 18.7077 8.98648 0.0748833 -72.7105 -72.7068 -0.421006 -3.46721 1.04586 0.730325 -3.62079 1.05275 54.2522 57.1548 -6.26471 10.8679 -0.000173328 0.00377776 0.194905 2.90256 17.1326 1 60 1.0 1 Hz (derivative)
13 2011-08-25T20:23:30 2011-08-25T20:23:00 2011-08-25T20:24:00 2011-08-25T20:23:17.504 2011-08-25T20:23:07.504 2011-08-25T20:23:13.504 0.341387 60 0.78154 0.2342 0.34695 2.2526 1.24145 0.854664 3.76352 3.82069 3.72665 3.6179 0.97082 -0.0571714 0.0153412 0.0577457 5.0159 -0.23 -0.11 -0.22 0.269334 0.143584 0.142278 -0.414728 -0.562834 0.714996 0.602407 -0.294687 0.741799 -0.278647 0.793241 0.54141 10.0 1.004 2.11358 82114.0 -0.689713 1.582 0.412 428.838 -13.355 0.1 429.046 -2.07814 2.5292 0.996908 2.07442 429.17 -15.606 0.0614582 2.07414 429.172 -15.6222 0.0611804 262.345 130.034 170.263 1702.63 3.99453 156.643 55.8968 18.9285 10.8695 0.211033 263.179 263.185 -0.848572 -0.190021 3.72042 -1.11791 -0.333605 3.57814 57.8458 56.9841 -12.8475 -16.9264 -0.000282222 0.00601494 -0.0571714 -0.861705 -4.0789 1 60 1.0 1 Hz (derivative)
87504 2016-06-29T15:21:30 2016-06-29T15:21:00 2016-06-29T15:22:00 2016-06-29T15:21:14.687 2016-06-29T15:21:13.187 2016-06-29T15:21:14.437 1.2463 480 2.08856 0.892262 0.543483 2.34075 1.74347 1.08593 2.81901 2.41202 2.51736 -1.4474 -0.574968 0.406994 0.161675 0.180869 17.3459 -0.28 0.84 0.01 -0.884552 0.0144466 0.0381947 -0.0985715 -0.044692 0.994126 -0.35535 0.934219 0.0309964 -0.641592 -0.267891 0.718745 1.5 5.41 0.02741 25243.0 0.00814842 -0.0859243 0.0588 475.24 5.49948 0.0 475.271 -0.704669 3.69148 -0.454558 0.0275762 474.948 5.48511 0.0 0.0275764 474.948 5.4851 0.0 -163.739 306.383 47.0909 70.6363 18.3508 1375.52 331.565 1.45609 0.0513525 12.6028 -163.649 -163.649 0.668572 -1.82083 -1.43367 1.55312 -1.83528 -1.47187 316.731 370.174 87.7927 203.946 1.95833e-7 0.000106131 0.406994 53.4427 116.153 5 60 0.12 8 Hz (derivative)
87505 2016-06-29T15:59:30 2016-06-29T15:59:00 2016-06-29T16:00:00 2016-06-29T15:59:31.062 2016-06-29T15:59:29.687 2016-06-29T15:59:30.187 0.790728 480 0.934886 0.402805 0.464925 2.01083 2.04263 0.491196 4.35115 4.12609 4.22361 -2.65729 -0.629152 0.225064 0.0532871 0.0532871 0.629198 0.0025 0.2275 -0.0325 -0.175275 0.0199958 0.147301 0.636727 -0.115901 -0.762329 -0.503932 0.816307 0.282305 -0.523326 -0.548573 0.652072 1.375 5.41 0.02788 25007.0 0.0079531 -0.0863953 0.0596 474.416 5.45885 0.0 474.447 -0.425639 1.91666 -0.294431 0.027876 474.423 5.45919 0.0 0.0278762 474.423 5.45918 0.0 -234.617 251.269 301.441 414.481 1.29671 1363.88 551.589 2.46387 0.303899 0.526289 -234.62 -234.62 3.20112 0.497232 -2.55542 3.37639 0.477236 -2.70273 538.891 568.283 418.084 440.975 1.79514e-7 0.000145857 0.225064 29.3928 22.8905 5 60 0.12 8 Hz (derivative)
87506 2016-06-29T16:20:30 2016-06-29T16:20:00 2016-06-29T16:21:00 2016-06-29T16:20:55.187 2016-06-29T16:20:53.312 2016-06-29T16:20:54.062 0.5829 480 0.888769 0.21889 0.441763 2.01187 1.71113 0.774391 4.51767 4.28589 4.45427 -1.25316 -0.28134 0.23178 0.0520354 0.0670942 6.24985 -0.495833 4.44089e-16 -0.195 0.523758 -0.0720109 0.0660921 -0.342291 -0.354001 0.870356 0.922504 0.182248 0.340253 -0.180254 -0.576078 0.797272 1.875 5.41 0.02788 25007.0 0.0079531 -0.0863953 0.0596 474.416 5.45885 0.0 474.447 -0.425639 1.91666 -0.294431 0.0280367 474.095 5.45148 0.0 0.0280369 474.095 5.45147 0.0 438.645 88.66 164.321 308.102 3.75023 1363.88 581.712 2.59843 0.225901 1.44327 438.348 438.348 -0.975563 3.99579 -1.20448 -1.49932 4.0678 -1.27057 558.156 588.339 -127.049 -195.257 2.34375e-7 -0.000444866 0.23178 30.1825 -68.2087 5 60 0.12 8 Hz (derivative)
87507 2016-06-29T16:36:30 2016-06-29T16:36:00 2016-06-29T16:37:00 2016-06-29T16:36:21.687 2016-06-29T16:36:20.687 2016-06-29T16:36:21.062 0.514297 480 1.05464 0.294131 0.23233 3.5856 2.95812 0.764541 5.62783 5.5427 5.58459 4.3971 0.787362 0.0851297 0.0152437 0.0310115 5.2637 0.37 0.3575 -0.075 0.515545 0.00659611 0.067088 -0.278181 0.0872304 -0.95656 -0.664408 -0.74638 0.0384427 -0.466809 0.454611 0.758563 1.0 5.41 0.02833 24769.0 0.00771891 -0.0870625 0.0603 473.494 5.43767 0.0 473.525 -3.13824 2.97857 -2.4994 0.0281526 473.858 5.44602 0.0 0.0281527 473.857 5.44601 0.0 -318.652 218.559 131.243 131.243 4.63571 1353.0 723.513 3.284 0.0970011 1.4116 -318.9 -318.9 -1.19746 -3.1021 4.43448 -1.71301 -3.10869 4.36739 720.344 731.407 -155.625 -222.626 1.25e-7 0.000174502 0.0851297 11.0621 -67.0012 5 60 0.12 8 Hz (derivative)
87508 2016-06-29T17:14:30 2016-06-29T17:14:00 2016-06-29T17:15:00 2016-06-29T17:14:29.187 2016-06-29T17:14:28.312 2016-06-29T17:14:28.812 0.661251 480 3.15384 1.0687 1.09096 2.89089 1.45176 3.52315 8.59804 9.36332 8.96381 -7.60237 -0.848119 -0.765284 0.0853749 0.0853749 11.5484 -0.58 -1.4425 -1.195 1.96042 -0.0167565 -0.0412274 -0.836478 -0.108635 0.537124 0.306603 0.720318 0.622203 0.749531 -0.585623 0.308624 0.875 5.41 0.02833 24769.0 0.00771891 -0.0870625 0.0603 473.494 5.43767 0.0 473.525 -3.13824 2.97857 -2.4994 0.0284337 473.3 5.45152 0.0 0.0284338 473.3 5.45154 0.0 149.091 351.714 396.658 347.076 7.06813 1353.0 1161.31 5.27113 0.256523 1.34091 149.042 149.042 4.29769 -3.30531 -7.63391 2.33727 -3.28856 -7.59269 1210.85 1111.88 555.771 302.251 1.04514e-7 -4.98684e-5 -0.765284 -98.9675 -253.52 5 60 0.12 8 Hz (derivative)
87509 2016-06-29T17:48:00 2016-06-29T17:47:30 2016-06-29T17:48:30 2016-06-29T17:47:41.187 2016-06-29T17:47:40.437 2016-06-29T17:47:40.937 0.193456 480 0.88697 0.225692 0.368589 2.40639 1.67458 0.92477 9.01884 8.86423 8.93143 0.82056 0.0918733 0.154603 0.01731 0.01731 0.172297 -0.015 -0.1 0.12 -0.124578 0.0940372 -0.0161989 -0.995398 0.06645 -0.0690497 0.0394728 -0.0544119 0.997738 -0.998427 0.0376386 0.0415527 0.75 5.41 0.02876 24531.0 0.00738661 -0.0877102 0.061 472.69 5.49513 -0.0 472.722 0.463417 -1.95633 4.53201 0.0286717 472.855 5.48332 0.0 0.0286718 472.855 5.48333 0.0 18.3594 471.74 470.149 352.612 1.56527 1342.85 1148.43 5.2918 0.262585 0.295791 18.3666 18.3665 6.0155 -6.45795 0.826629 6.14008 -6.55199 0.842828 1141.54 1161.45 774.682 790.724 8.95833e-8 -7.2645e-6 0.154603 19.9081 16.042 5 60 0.12 8 Hz (derivative)
87510 2016-06-29T18:16:00 2016-06-29T18:15:30 2016-06-29T18:16:30 2016-06-29T18:16:10.937 2016-06-29T18:16:06.812 2016-06-29T18:16:09.437 0.168919 480 1.31349 0.396385 0.502213 2.61541 1.13501 1.12566 4.71024 6.55409 5.55256 0.597225 0.107558 -1.84385 0.332072 0.332072 2.67069 0.11 0.365 -1.8225 1.86107 0.0414875 -0.0391232 -0.420353 0.894244 0.153723 -0.0368814 -0.175518 0.983785 0.997745 -0.0617035 0.0263962 4.125 5.41 0.02876 24531.0 0.00738661 -0.0877102 0.061 472.69 5.49513 -0.0 472.722 0.463417 -1.95633 4.53201 0.0288701 472.442 5.48944 0.0 0.0288706 472.441 5.48941 0.0 -18.398 471.285 193.783 799.354 4.62256 1342.85 713.964 3.28985 0.595267 1.4051 -18.3878 -18.3878 6.52777 -0.218161 0.544749 4.6667 -0.259649 0.583872 841.136 604.496 837.757 598.908 4.69792e-7 4.32124e-5 -1.84385 -236.64 -238.85 5 60 0.12 8 Hz (derivative)
87511 2016-06-29T20:54:30 2016-06-29T20:54:00 2016-06-29T20:55:00 2016-06-29T20:54:30.937 2016-06-29T20:54:29.437 2016-06-29T20:54:30.187 1.06155 480 1.838 0.854455 0.518517 2.15108 1.07976 4.51984 5.76292 4.85169 5.53756 0.894678 0.161565 0.91123 0.164554 0.214051 30.7168 0.555 -2.89 0.125 -2.94412 -0.0875288 -0.0151137 0.818968 0.133133 -0.558182 0.171541 -0.985017 0.0177459 -0.701301 -0.109441 0.704415 1.5 5.41 0.02992 23837.0 0.00641093 -0.0905752 0.0628 470.023 5.41212 -0.0 470.054 1.54768 0.235514 2.1228 0.0298869 470.108 5.41407 0.0 0.0298871 470.107 5.41406 0.0 75.297 330.22 385.654 578.481 9.32642 1316.56 698.097 3.34648 0.439389 2.78694 75.3096 75.3095 0.0229038 4.76482 0.913721 2.96703 4.85234 0.928834 611.97 726.907 2.88898 374.246 1.5e-7 -5.71838e-5 0.91123 114.937 371.357 5 60 0.12 8 Hz (derivative)
87512 2016-06-29T21:19:00 2016-06-29T21:18:30 2016-06-29T21:19:30 2016-06-29T21:18:57.937 2016-06-29T21:18:56.187 2016-06-29T21:18:56.687 0.547449 480 1.23889 0.453805 0.376279 2.73001 1.54969 1.27661 2.50944 3.15285 2.87799 0.663515 0.230548 -0.643415 0.223564 0.223564 8.42884 -0.1 -0.5 0.57 -0.701771 -0.299502 -0.0521193 -0.6921 0.598458 0.403542 -0.140467 -0.896545 0.42009 -0.976218 0.196179 0.0922577 1.75 5.41 0.02992 23837.0 0.00641093 -0.0905752 0.0628 470.023 5.41212 -0.0 470.054 1.54768 0.235514 2.1228 0.0300273 469.732 5.40543 0.0 0.0300275 469.732 5.40542 0.0 -70.875 457.783 322.064 563.612 3.15432 1316.56 362.816 1.73923 0.428095 1.81362 -70.8281 -70.8281 -2.09381 -2.26569 0.650455 -1.39204 -1.96619 0.702575 396.756 315.787 -263.485 -175.174 1.65278e-7 7.21706e-5 -0.643415 -80.9684 88.3115 5 60 0.12 8 Hz (derivative)
87513 2016-06-29T21:32:00 2016-06-29T21:31:30 2016-06-29T21:32:30 2016-06-29T21:32:02.187 2016-06-29T21:32:01.062 2016-06-29T21:32:01.312 1.15721 480 2.51502 0.244893 0.947834 2.65344 2.09882 2.84227 5.3648 4.48802 4.93079 0.384782 0.0780367 0.876779 0.177817 0.177817 2.77354 0.43 0.445 0.665 -0.767023 0.48579 -0.0288773 -0.528231 -0.507202 0.680969 -0.00655156 0.761604 0.64801 -0.394338 -0.597477 0.698225 1.125 5.41 0.03026 23619.0 0.00600086 -0.0916153 0.0634 469.101 5.39093 -0.0 469.132 2.83202 3.72696 -0.33005 0.0301014 469.531 5.40081 0.0 0.0301015 469.531 5.40081 0.0 1.03241 188.205 250.528 281.844 9.02815 1309.14 618.101 2.99667 0.215289 3.01273 1.03712 1.03712 2.94857 -3.36638 0.340287 3.71559 -3.85217 0.369165 564.079 674.275 370.592 466.995 1.0625e-7 -3.15547e-6 0.876779 110.197 96.4027 5 60 0.12 8 Hz (derivative)
87514 2016-06-29T23:32:30 2016-06-29T23:32:00 2016-06-29T23:33:00 2016-06-29T23:32:17.062 2016-06-29T23:32:15.812 2016-06-29T23:32:16.812 0.503273 480 2.06972 0.531163 0.584853 3.53887 1.91622 1.09647 7.26576 7.02927 7.23701 -1.63619 -0.226087 0.23649 0.0326778 0.0660239 2.14424 0.325 0.06 -0.135 0.355754 -0.0171602 0.0243824 -0.304861 -0.345548 -0.8875 -0.922495 -0.222212 0.315633 0.30077 0.0987432 0.948571 1.25 5.41 0.03085 23217.0 0.00508489 -0.0940889 0.0645 467.396 5.43556 -0.1 467.427 1.05905 6.63447 -4.30957 0.0307206 467.812 5.4415 -0.0537726 0.0307207 467.812 5.44149 -0.0538073 -432.41 141.02 144.28 180.35 6.04758 1296.56 898.482 4.44094 0.139099 1.36178 -432.781 -432.781 -4.70161 -4.971 -1.61078 -5.05736 -4.95384 -1.63517 874.528 903.948 -584.938 -629.197 9.72222e-8 0.000278699 0.23649 29.4208 -44.2592 5 60 0.12 8 Hz (derivative)
87515 2016-06-29T23:50:30 2016-06-29T23:50:00 2016-06-29T23:51:00 2016-06-29T23:50:57.187 2016-06-29T23:50:54.937 2016-06-29T23:50:56.812 0.419085 480 1.25393 0.580302 0.491301 2.16083 1.45921 0.81699 9.24715 9.1499 9.083 -3.41187 -0.375632 0.0972435 0.0107061 0.0295818 5.54417 0.8475 -0.0125 0.2875 -0.890188 -0.0851603 -0.037173 0.258809 -0.559683 -0.787257 0.947407 -0.11541 0.298496 -0.272685 0.19711 0.941696 2.25 5.41 0.03085 23217.0 0.00508489 -0.0940889 0.0645 467.396 5.43556 -0.1 467.427 1.05905 6.63447 -4.30957 0.0308076 467.532 5.43751 -0.0848594 0.0308078 467.532 5.4375 -0.0849219 442.157 126.475 118.003 265.506 5.50954 1296.56 1127.66 5.57372 0.204777 0.988484 442.291 442.29 -0.108655 8.45849 -3.48753 0.781533 8.54365 -3.45036 1136.75 1148.83 -13.4989 97.0946 1.75e-7 -0.000551367 0.0972435 12.0779 110.594 5 60 0.12 8 Hz (derivative)
In [5]:
Code
begin
    log_axis = (yscale=log10, xscale=log10)

    j_limit = (10^-1, 10^1)
    j_norm_limit = (10^-2, 2)
end
(0.010000000000000002, 2)

Check the effect of time window tau

In [40]:
Code
# plot the number of events with respect to tau in different radial distances

specs = data(j_events_taus) * mapping(:tau, row=:r) * histogram()
draw(specs, facet=(; linkyaxes=:none))
In [47]:
Code
# get unique events defined by the starting time and ending time
cols = [:"t.d_start", :"t.d_end"]

println("Number of events: ", size(j_events_taus, 1))
j_events_taus_u = unique(j_events_taus, cols)
println("Number of unique events: ", size(j_events_taus_u, 1))
Number of events: 129460
Number of unique events: 88679

Check the discontinuities properties with radial distance

In [6]:
Code
datalimits_f = x -> quantile(x, [0.05, 0.97])
#18 (generic function with 1 method)
In [7]:
Code
# NOTE: log axis for density is not working now
function plot_l_j_r(df)
    fig = Figure(size=(1000, 1000))

    plt = data(df) * mapping(row=:r, color=:label)
    plt = plt * density(datalimits=datalimits_f)

    plt1 = plt * mapping(l_map)
    plt2 = plt * mapping(l_norm_map)
    plt3 = plt * mapping(j_map)
    plt4 = plt * mapping(j_norm_map)

    axis = (; yscale = identity)
    
    # axis = (; yscale=log10, limits=(nothing, nothing, 10^-3, 1))
    # l_axis = (; yscale = log10, limits=(nothing, (10^-5, 10^-3)))
    # l_norm_axis = (; yscale = log10, limits=(nothing, (10^-3, 1)))

    grid1 = draw!(fig[1:5, 1], plt1, axis=axis)
    grid2 = draw!(fig[1:5, 2], plt2, axis=axis)
    grid3 = draw!(fig[1:5, 3], plt3, axis=axis)
    grid4 = draw!(fig[1:5, 4], plt4, axis=axis)
    legend!(fig[0, 1:end], grid1, titleposition=:left, orientation=:horizontal)

    fig
end
plot_l_j_r (generic function with 1 method)
In [6]:
Code
plot_l_j_r(j_events)
In [11]:
Code
B_lab = L"Fitted Amplitude ($nT$)"

b_map = :"fit.vars.amplitude" => log ∘ abs => B_lab
"fit.vars.amplitude" => (log ∘ abs => L"Fitted Amplitude ($nT$)")
In [3]:
Code
function plot_l_j_r_hist(
    df;
    maps=(l_map, l_norm_map, j_map, j_norm_map),
    f_maps=(row=:r, color=:label),
    normalization=:pdf,
    fig_options = (size = (1200, 1000),)
)
    fig = Figure(fig_options)

    plt = data(df) * mapping(; f_maps...) * (visual(Lines) + visual(Scatter))
    plt *= histogram(datalimits=datalimits_f, normalization=normalization)

    plts = [plt * mapping(m) for m in maps]
    axis = (; yscale=log10)

    grids = [draw!(fig[1:5, i], p, axis=axis) for (i, p) in enumerate(plts)]
    legend!(fig[0, 1:end], grids[1], titleposition=:left, orientation=:horizontal)

    fig
end
plot_l_j_r_hist (generic function with 1 method)
In [4]:
Code
df = @chain j_events_taus begin
    filter(:r => ==("1"), _)
end

plot_l_j_r_hist(df ; maps=(b_map,))
In [8]:
Code
plot_l_j_r_hist(j_events)
Figure 1
In [9]:
Code
maps = (l_log_map, l_norm_log_map, j_log_map, j_norm_log_map)
plot_l_j_r_hist(j_events; maps = maps, normalization = :none)
In [15]:
Code
function plot_l_j_r_hist(
    df;
    maps=(l_map, l_norm_map, j_map, j_norm_map),
    f_maps = (color=:r,),
    size = (1200, 800),
)
    fig = Figure(size=size)
    axis = (; yscale=log10)

    plt = data(df) * mapping(; f_maps...) * (visual(Lines) + visual(Scatter))
    plt_h = plt * histogram(datalimits=datalimits_f, normalization=:pdf)
    plts = [plt_h * mapping(m) for m in maps]
    grids = [draw!(fig[1, i], p, axis=axis) for (i, p) in enumerate(plts)]


    plt_h = plt * histogram(datalimits=datalimits_f)
    plts = [plt_h * mapping(m) for m in maps]
    grids = [draw!(fig[2, i], p, axis=axis) for (i, p) in enumerate(plts)]
    legend!(fig[0, 1:end], grids[1], titleposition=:left, orientation=:horizontal)

    fig
end

plot_l_j_r_hist(j_events_low_fit; maps=maps, f_maps=f_maps)
In [49]:
Code
@rput j_events
@rput j_events_taus
@rput j_events_taus_u
@rput j_events_low_fit
@rput j_events_tau_20_fit


R"""
library(ggplot2)
library(ggpubr)
library(patchwork)
source('utils.R')
"""
RObject{VecSxp}
$value
function (df1, df2, p1title = p1title, y_lim_1 = c(500, 40000), 
    y_lim_2 = c(1, 200)) 
{
    x_col <- "radial_distance"
    x_bins <- 5
    y_bins <- 12
    add_mode <- TRUE
    y_col <- "L_k"
    y_lim <- y_lim_1
    ylab <- lab_l_log
    p <- plot_binned_data(df1, x_col = x_col, y_col = y_col, 
        x_bins = x_bins, y_bins = y_bins, y_lim = y_lim, y_log = TRUE, 
        add_mode = add_mode)
    p1 <- p + labs(x = NULL, y = ylab) + ggtitle(p1title)
    y_col <- "L_k_norm"
    y_lim <- y_lim_2
    ylab <- lab_l_norm_log
    p <- plot_binned_data(df1, x_col = x_col, y_col = y_col, 
        x_bins = x_bins, y_bins = y_bins, y_lim = y_lim, y_log = TRUE, 
        add_mode = add_mode)
    p2 <- p + labs(x = x_lab_r, y = ylab)
    x_col <- "time"
    y_col <- "L_k"
    y_lim <- y_lim_1
    p <- plot_binned_data(df2, x_col = x_col, y_col = y_col, 
        x_bins = x_bins, y_bins = y_bins, y_lim = y_lim, y_log = TRUE, 
        add_mode = add_mode)
    p3 <- p + labs(x = NULL, y = NULL) + ggtitle(p2title)
    y_col <- "L_k_norm"
    y_lim <- y_lim_2
    p <- plot_binned_data(df2, x_col = x_col, y_col = y_col, 
        x_bins = x_bins, y_bins = y_bins, y_lim = y_lim, y_log = TRUE, 
        add_mode = add_mode)
    p4 <- p + labs(x = x_lab_t, y = NULL)
    (p1 + p2 + p3 + p4) + layout & scale_fill_viridis_c(limits = c(0.01, 
        0.25), trans = "log10", name = "pdf")
}

$visible
[1] FALSE
In [10]:
Code
R"""
density_plot <- function(df,
  x,
  density.y = "density",
  facet.by = "r",
  color = "label",
  strip.position = "top")
{
  p <- ggdensity(
    df, 
    x = x, y = density.y,
    color = color,
    facet.by = facet.by,
    add = "median",
    alpha = 0
  ) %>%
  facet(facet.by, ncol = 1, strip.position = strip.position)
}

plot <- function(
  df,
  d1_ulim = 8000,
  d2_ulim = 40,
  d3_ulim = 8,
  d4_ulim = 1.2,
  xscale = "none",
  yscale = "log10",
  p1_xlim = NULL,
  p1_ylim = NULL,
  p2_xlim = NULL,
  p2_ylim = NULL, # c(10^-3, 1)
  p3_xlim = NULL, p3_ylim = NULL,
  p4_xlim = NULL, p4_ylim = NULL,
  plot_func = density_plot,
  ...
) {

  p1 <- plot_func(
    filter(df, L_k < d1_ulim), "L_k", ...
  )
  
  p2 <- plot_func(
    filter(df, L_k_norm < d2_ulim), "L_k_norm", ...
  )
  
  p3 <- plot_func(
    filter(df, j0_k < d3_ulim), "j0_k", ...
  )
  
  p4 <- plot_func(
    filter(df, j0_k_norm < d4_ulim), "j0_k_norm", strip.position = "right", ...
  )

  p1 <- ggpar(p1,
      xscale=xscale, xlim = p1_xlim,
      yscale=yscale, ylim = p1_ylim
    ) + labs(x = lab_l)
  
  p2 <- ggpar(p2, 
      xscale=xscale, xlim = p2_xlim,
      yscale=yscale, ylim = p2_ylim, ylab=FALSE
    ) + labs(x = lab_l_norm)
  
  p3 <- ggpar(p3,
      xscale=xscale, xlim = p3_xlim,
      yscale=yscale, ylim = p3_ylim, ylab=FALSE
    ) + labs(x = lab_j)
  
  p4 <- ggpar(p4,
      xscale=xscale, xlim = p4_xlim,
      yscale=yscale, ylim = p4_ylim, ylab=FALSE
    ) + labs(x = lab_j_norm)
  
  tag_pool <- unique(df$r)
  
  p1 <- tag_facet(p1, open = "(a.", tag_pool = tag_pool)
  p2 <- tag_facet(p2, open = "(b.", tag_pool = tag_pool)
  p3 <- tag_facet(p3, open = "(c.", tag_pool = tag_pool)
  p4 <- tag_facet(p4, open = "(d.", tag_pool = tag_pool) + theme(
    strip.background = element_blank(),
    strip.text.x = element_blank()
  )

  p <- p1 + p2 + p3 + p4
  p <- p + plot_layout(nrow = 1, guides = "collect") & theme(legend.position='top')  
}
"""

Properties over radial distance with different tau values

In [36]:
Code
R"""
plot(
    j_events_taus,
    d1_ulim = Inf, p1_xlim = c(0,1e4), p1_ylim = c(1e-5, 1e-3),
    d2_ulim = 25, p2_xlim = c(0,25), p2_ylim = c(1e-2, 1e0),
    d3_ulim = 20, p3_xlim = c(0,8), p3_ylim = c(1e-2, 1e0),
    d4_ulim = 2, p4_xlim = c(0, 1), p4_ylim =  c(1e-1, 1e1),
)

save_plot("l_j_fit_taus", width = 15, height = 5)


plot(
    j_events_taus,
    xscale = "log10",
    d1_ulim = Inf, p1_xlim = c(1e2, 1e5), p1_ylim = c(1e-2, 1e0),
    d2_ulim = Inf, p2_xlim = c(1e-1, 1e2), p2_ylim = c(1e-2, 1e0),
    d3_ulim = Inf, p3_xlim = c(1e-2, 5e1), p3_ylim = c(1e-2, 1e0),
    d4_ulim = Inf, p4_xlim = c(1e-3, 5e0), p4_ylim = c(1e-2, 1e0),
)

save_plot("l_j_fit_taus_xscale_log", width = 15, height = 5)
"""
In [61]:
Code
R"""
plot(
    j_events_taus_u,
    xscale = "log10",
    d1_ulim = Inf, p1_xlim = c(1e2, 1e5), p1_ylim = c(1e-2, 1e0),
    d2_ulim = Inf, p2_xlim = c(1e-1, 1e2), p2_ylim = c(1e-2, 1e0),
    d3_ulim = Inf, p3_xlim = c(1e-2, 5e1), p3_ylim = c(1e-2, 1e0),
    d4_ulim = Inf, p4_xlim = c(1e-3, 5e0), p4_ylim = c(1e-2, 1e0),
    facet.by = NULL, color = "r"
)

save_plot("l_j_fit_xscale_log", width = 15, height = 5)

plot(
    j_events_taus_u,
    d1_ulim = Inf, p1_xlim = c(0, 1e4), p1_ylim = c(1e-5, 1e-3),
    d2_ulim = Inf, p2_xlim = c(0, 25), p2_ylim = c(1e-2, 1e0),
    d3_ulim = 20, p3_xlim = c(0,8), p3_ylim = c(1e-2, 1e0),
    d4_ulim = 2, p4_xlim = c(0, 1), p4_ylim =  c(1e-1, 1e1),
    facet.by = NULL, color = "r",
)

save_plot("l_j_fit", width = 15, height = 5)
"""

Check the effect of time resolution and time window

In [203]:
Code
R"""
# plot(j_events_der)
# save_plot("l_j_r_der", width = 15, height = 10)
# plot(
#     j_events,
#     p1_ylim = c(1e-5, 1e-3),
# )
# save_plot("l_j_r_fit", width = 15, height = 10)

plot(
    j_events,
    xscale = "log10",
    d1_ulim = Inf, p1_xlim = c(1e2, 1e5), p1_ylim = c(1e-2, 1e0),
    d2_ulim = Inf, p2_xlim = c(1e-1, 1e2), p2_ylim = c(1e-2, 1e0),
    d3_ulim = Inf, p3_xlim = c(1e-2, 5e1), p3_ylim = c(1e-2, 1e0),
    p4_xlim = c(1e-3, 5e0), p4_ylim = c(1e-2, 1e0),
)
save_plot("l_j_r_fit_xscale_log", width = 15, height = 10)
"""

Plot the median of discontinuity properties with radial distance

In [47]:
Code
function q25(x)
    quantile(x, 0.25)
end

function q75(x)
    quantile(x, 0.75)
end

function stat_info(df; group_cols = [:r, :label])
    cols = [:L_k, :L_k_norm, :j0_k, :j0_k_norm]
    funcs = [median mean std q25 q75]
    
    @chain df begin
        groupby(group_cols)
        combine(cols .=> funcs)
    end
end
stat_info (generic function with 1 method)
In [68]:
Code
### Plot the median of discontinuity properties with radial distance
function plot_median_r(df; add_error=false)
    df_m = stat_info(df)

    fig = Figure()
    plt = data(df_m) * mapping(:r => r_lab, color=:label)

    mappings = [
        ("L_k", l_lab),
        ("L_k_norm", l_norm_lab),
        ("j0_k", j_lab),
        ("j0_k_norm", j_norm_lab)
    ]

    function plt_map(plt, col, label)
        plt *= mapping("$(col)_median" => label)
        lines_map = (visual(Lines) + visual(Scatter))
        errorbars_map = mapping("$(col)_q25", "$(col)_q75") * visual(Errorbars, alpha=0.1, whiskerwidth=10)

        maps = [lines_map]
        add_error && push!(maps, errorbars_map)
        
        plt * reduce(+, maps)
    end

    plts = [plt_map(plt, col, label) for (col, label) in mappings]
    popositions = [(1, 1), (1, 2), (2, 1), (2, 2)] # Define grid positions
    grids = [draw!(fig[pos...], plt) for (pos, plt) in zip(popositions, plts)]
    pretty_legend!(fig, grids[1])

    fig
end
plot_median_r (generic function with 3 methods)
In [92]:
Code
plot_median_r(j_events)
In [91]:
Code
plot_median_r(j_events_taus)
In [82]:
Code
plot_median_r(j_events)
In [81]:
Code
plot_median_r(j_events_taus)
In [124]:
Code
plot_median_r(j_events; add_error=true)

Plot different radial distances in the same plot

In [54]:
Code
function plot_l_r_one(df)
    fig = Figure(size=(1000, 500))

    plt = data(df) * mapping(col=:label, color=:r)
    
    grid1 = draw!( fig[1, 1:2], plt * mapping(:L_k_norm) * density(datalimits=((0, 50),)) )
    grid2 = draw!( fig[2, 1:2], plt * mapping(:L_k) * density(datalimits=((0, 5000),)) )
    legend!(fig[0, 1:end], grid1, titleposition=:left, orientation=:horizontal)

    fig
end

plot_l_r_one(j_events)
Figure 2

Plasma properties with radial distance

In [66]:
Code
plt = data(j_events) * mapping(:radial_distance, :Alfven_speed, color=:label) * (visual(Scatter) + smooth())
plt |> draw
In [64]:
Code
plt = data(j_events) * mapping(:radial_distance, jA_map, color=:label) * (visual(Scatter) + smooth())
plt |> draw
In [79]:
Code
using Statistics
In [86]:
Code
# groupby r and describe the data for each group 
# j_events |> @groupby(_.r) |> @map({r=key(_), j0_k=describe(_.j0_k), L_k=describe(_.L_k)})
@chain j_events begin
    groupby(:r)
    combine(:plasma_density =>  mean, :ion_inertial_length => mean, :b_mag => mean) 
end
5×4 DataFrame
Row r plasma_density_mean ion_inertial_length_mean b_mag_mean
String Float64 Float64 Float64
1 1.0 3.10512 152.217 3.75957
2 2.0 1.42267 242.722 2.10041
3 3.0 0.674452 317.706 1.45649
4 4.0 0.417696 434.665 1.3097
5 5.0 0.343857 569.222 1.27077
In [67]:
Code
plt = data(j_events) * mapping(:radial_distance, :plasma_density, color=:label) * (visual(Scatter) + smooth())
plt |> draw
In [65]:
Code
plt = data(j_events) * mapping(:radial_distance, di_map, color=:label) * (visual(Scatter) + smooth())
plt |> draw

Check discontinuities properties in relation to the local plasma properties

In [13]:
Code
begin
    fig = Figure(size=(1000, 800))

    datalayer = mapping() * visual(Scatter, markersize=1, color=:white, alpha=0.1)

    begin
        layer = histogram(bins=range(1, 5, length=64), normalization=:pdf)
        plt = layer * mapping(di_log_map, l_log_map)
        plt1 = data(j_events) * mapping(layout=:r) * plt
        plt2 = data(w_events) * plt
    
        l_log_limit = ((1.5, 3.5), (1.5, 4.5))
        axis = (;limits=l_log_limit)
        draw!(fig[1:2,1:3], plt1, axis=axis)
        draw!(fig[1:2,4:5], plt2, axis=axis) 
    end

    # Current Density Panels
    begin
        layer = histogram(bins=range(-2, 3, length=64), normalization=:pdf)
        plt = layer * mapping(jA_log_map, j_log_map)
        plt3 = data(j_events) * mapping(layout=:r) * plt
        plt4 = data(w_events) * plt
    
        j_log_limit = ((-1, 3), (-2, 2))
        axis = (;limits=j_log_limit)
        draw!(fig[3:4,1:3], plt3, axis=axis)
        draw!(fig[3:4,4:5], plt4, axis=axis)
    end

    # Make ablines across different r panels
    # begin
        # ablines_data = (; intercepts=[-3,-1,1], slopes=[1,1,1]) 
        # lines = data(ablines_data) * mapping(:intercepts, :slopes) * visual(ABLines, linestyle=:dash)
        # draw!(fig[3:4,1:3], lines)
    # end

    Label(fig[0,1:3], "Juno in Different Radial Distances", fontsize=20)
    Label(fig[0,4:5], "Wind 11 Hz", fontsize=20)

    fig
end
Figure 3
In [14]:
Code
begin
    fig = Figure(size=(1000, 800))

    pdflayer = density() * visual(Contour)
    # small scatter points
    datalayer = mapping() * visual(Scatter, markersize=3)

    # layer = pdflayer + datalayer
    layer = datalayer
    plt = layer * mapping(di_map, l_map)
    plt1 = data(j_events) * mapping(layout=:r) * plt
    plt2 = data(w_events) * plt

    l_limit = ((10^1, 10^5), (10^1, 10^5))
    axis = merge(log_axis, (;limits=l_limit))
    draw!(fig[1:2,1:3], plt1, axis=axis)
    draw!(fig[1:2,4:5], plt2, axis=axis)

    plt = layer * mapping(jA_map, j_map)
    plt3 = data(j_events) * mapping(layout=:r) * plt
    plt4 = data(w_events) * plt

    j_limit = ((10^-1, 10^3), (10^-2, 10^2))
    axis = merge(log_axis, (;limits=j_limit))
    draw!(fig[3:4,1:3], plt3, axis=axis)
    draw!(fig[3:4,4:5], plt4, axis=axis)


    Label(fig[0,1:3], "Juno in Different Radial Distances", fontsize=20)
    Label(fig[0,4:5], "Wind 11 Hz", fontsize=20)

    fig
end
Figure 4
In [15]:
Code
begin
    fig = Figure(size=(1000, 800))
    datalimits_f = x -> quantile(x, [0.05, 0.95])

    begin
        layer = histogram(bins=24, datalimits=datalimits_f, normalization=:pdf)
        plt = layer * mapping(l_norm_log_map, j_norm_log_map)
        plt1 = data(j_events) * mapping(layout=:r) * plt
        plt2 = data(w_events) * plt

        axis = (;)
        draw!(fig[1:2, 1:3], plt1, axis=axis)
        draw!(fig[1:2, 4:5], plt2, axis=axis)
    end

    Label(fig[0, 1:3], "Juno in Different Radial Distances", fontsize=20)
    Label(fig[0, 4:5], "Wind 11 Hz", fontsize=20)

    fig
end

fig

Derivative method validation

In [16]:
Code
fig = plot_l_j_r(j_events_der)
fig
Figure 5